<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: hp
  Date: 2021/10/20
  Time: 10:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<table class="table table-striped">
    <tr>
        <td>姓名</td>
        <td>电话</td>
        <td>邮箱</td>
        <td>关系</td>
        <td>操作<a href="insert.jsp">新增联系人</a></td>
    </tr>
    <c:forEach items="${all}" var="addresslist">
        <tr>
            <td>${addresslist.a_NAME}</td>
            <td>${addresslist.a_PHONE}</td>
            <td>${addresslist.a_MAIL}</td>
            <td>${addresslist.a_RELATION}</td>
            <td>删除</td>
        </tr>
    </c:forEach>
</table>
<div  align="center">
    <ul class="pagination">
<%--        <li><a href="${pageContext.request.contextPath}/findAll?page=${ps.pageNum-1}">&laquo;</a></li>--%>
        <li><a href="${pageContext.request.contextPath}/findAll.do?page=${ps.pageNum-1}">&laquo;</a></li>
        <c:forEach var="p" begin="1" end="${ps.pages}">
            <li><a href="${pageContext.request.contextPath}/findAll.do?page=${p}">${p}</a></li>
        </c:forEach>
<%--        <c:forEach var="p" begin="1" end="${ps.pages}">--%>
<%--            <li><a href="${pageContext.request.contextPath}/findAll?page=${p}">${p}</a></li>--%>
<%--        </c:forEach>--%>
    <li><a href="${pageContext.request.contextPath}/findAll.do?page=${ps.pageNum+1}">&raquo;</a></li>
<%--        <li><a href="${pageContext.request.contextPath}/findAll?page=${ps.pageNum+1}">&raquo;</a></li>--%>
    </ul><br>
</div>
</body>
</html>
